<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/7/29
  Time: 0:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>我的快件历史查询</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
    <style type="text/css">
        body{
            margin: 0;
            padding: 0;
            background-color: #eeeeee;
            font-family: "楷体";
        }
        .item{
            margin: 20px;
            margin-bottom: 50px;
        }
        .imte_top{
            text-align: center;
        }
        .imte_top>span{
            font-size:14px;
            display: inline-block;
            padding: 5px 12px;
            background-color: #ddd;
            color:#fff;
            border-radius: 5px;
        }
        .item_content{
            background-color: #fff;
            padding: 25px 15px;
            margin-top: 6px;
        }
        .item_content_top_1{
            font-size: 24px;
            font-weight: bold;
        }
        .item_content_top_2{
            color:#eee;
            font-size: 14px;
            margin: 5px 0px;
        }
        .item_content_top_3{
            margin: 10px 0px;
        }
        .item_content_top_4{
            margin: 10px 0px;
        }
        .item_content_bottom>a{
            text-decoration: none;
            color:#33e;
        }
    </style>
</head>
<body>

<div class="content" id="content">


    <%--<div class="item">--%>
    <%--<div class="imte_top"><span>2019-10-12 12:00</span></div>--%>
    <%--<div class="item_content">--%>
    <%--<div class="item_content_top">--%>
    <%--<div class="item_content_top_1">取件通知</div>--%>
    <%--<div class="item_content_top_2">2019-10-12 12:00</div>--%>
    <%--<div class="item_content_top_3">您有一个包裹到e栈了!</div>--%>
    <%--<div class="item_content_top_4">--%>
    <%--取件码:<span style="color:#05a">123123</span><br>--%>
    <%--快递公司:顺丰快递<br>--%>
    <%--运单号码:123123123213<br>--%>
    <%--站点电话:13843838438<br>--%>
    <%--取件地址:学校快件集散中心<br>--%>
    <%--</div>--%>
    <%--</div>--%>
    <%--<hr>--%>
    <%--<div class="item_content_bottom">--%>
    <%--<a href="personQRcode.jsp?code=<%=e.getCode()%>">二维码</a>--%>
    <%--</div>--%>
    <%--</div>--%>
    <%--</div>--%>

</div>
<div class="content">


    <%--<div class="item">--%>
    <%--<div class="imte_top"><span>2019-10-12 12:00</span></div>--%>
    <%--<div class="item_content">--%>
    <%--<div class="item_content_top">--%>
    <%--<div class="item_content_top_1">取件成功通知</div>--%>
    <%--<div class="item_content_top_2">2019-10-12 12:00</div>--%>
    <%--<div class="item_content_top_3">您有一个包裹从e栈取出了!</div>--%>
    <%--<div class="item_content_top_4">--%>
    <%--快递公司:顺丰快递<br>--%>
    <%--运单号码:12313431123<br>--%>
    <%--站点电话:13843838438<br>--%>
    <%--</div>--%>
    <%--</div>--%>
    <%--<hr>--%>
    <%--<div class="item_content_bottom">--%>
    <%--<a href="#">有疑问 ? 点了也没用</a>--%>
    <%--</div>--%>
    <%--</div>--%>
    <%--</div>--%>


</div>
<script src="js/jquery-1.11.1.js"></script>
<script src="layer/layer.js"></script>
<script src="assets/layui.all.js"></script>
<script>
    var name = "${sessionScope.usersname}";
    $.post("/wx/couriers/courierPatchHistory.do",{
    },function (data) {
        if(data["msgCode"]==200){
            var fetchdata = data["dataList"][0]["fetch"];
            var storedata = data["dataList"][0]["store"];
            console.log(fetchdata);
            console.log(storedata);
            for(i=0;i<fetchdata.length;i++){
                $("#content").append("<div class=\"item\">\n" +
                    "        <div class=\"imte_top\"><span>"+ fetchdata[i]["stateChangeTime"]+"</span></div>\n" +
                    "        <div class=\"item_content\">\n" +
                    "            <div class=\"item_content_top\">\n" +
                    "                <div class=\"item_content_top_1\"><p style='color: red'>快递已签收</p></div>\n" +
                    "                <div class=\"item_content_top_2\">"+fetchdata[i]["stateChangeTime"]+"</div>\n" +
                    "                <div class=\"item_content_top_3\">您送达的包裹从e栈取出了!</div>\n" +
                    "                <div class=\"item_content_top_4\">\n" +
                    "                    取件码:<span style=\"color:#05a\">"+fetchdata[i]["deliveryCode"]+"</span><br>\n" +
                    "                    快递公司:"+fetchdata[i]["deliveryCompany"]+"<br>\n" +
                    "                    运单号码:"+fetchdata[i]["deliveryNum"]+"<br>\n" +
                    "                    签收人电话:"+fetchdata[i]["acceptorPhone"]+"<br>\n" +
                    "                    取件地址:快递E栈<br>\n" +
                    "                </div>\n" +
                    "            </div>\n" +
                    "            <hr>\n" +
                    "            <div class=\"item_content_bottom\">\n" +
                    "                <a href=\"personQRcode.jsp?code="+fetchdata[i]["deliveryCode"]+"\">二维码</a>\n" +
                    "            </div>\n" +
                    "        </div>\n" +
                    "    </div>");
            }
            for(i=0;i<storedata.length;i++){
                $("#content").append("<div class=\"item\">\n" +
                    "        <div class=\"imte_top\"><span>"+ storedata[i]["stateChangeTime"]+"</span></div>\n" +
                    "        <div class=\"item_content\">\n" +
                    "            <div class=\"item_content_top\">\n" +
                    "                <div class=\"item_content_top_1\">快递未签收</div>\n" +
                    "                <div class=\"item_content_top_2\">"+storedata[i]["stateChangeTime"]+"</div>\n" +
                    "                <div class=\"item_content_top_3\">您存放一个包裹到e栈了!</div>\n" +
                    "                <div class=\"item_content_top_4\">\n" +
                    "                    取件码:<span style=\"color:#05a\">"+storedata[i]["deliveryCode"]+"</span><br>\n" +
                    "                    快递公司:"+storedata[i]["deliveryCompany"]+"<br>\n" +
                    "                    运单号码:"+storedata[i]["deliveryNum"]+"<br>\n" +
                    "                    签收人电话:"+storedata[i]["acceptorPhone"]+"<br>\n" +
                    "                    取件地址:快递E栈<br>\n" +
                    "                </div>\n" +
                    "            </div>\n" +
                    "            <hr>\n" +
                    "            <div class=\"item_content_bottom\">\n" +
                    "                <a href=\"personQRcode.jsp?code="+storedata[i]["deliveryCode"]+">二维码</a>\n" +
                    "            </div>\n" +
                    "        </div>\n" +
                    "    </div>");
            }
            return false;
        }else {
            layer.alert("未查询到您的快递！")
        }
    },"json");
</script>
</body>
</html>
